package com.atguigu.dga.assess.assess.security;

import com.atguigu.dga.assess.assess.AssessorTemplate;
import com.atguigu.dga.assess.bean.AssessParam;
import com.atguigu.dga.assess.bean.GovernanceAssessDetail;
import com.atguigu.dga.config.MetaConstant;
import org.springframework.stereotype.Component;

@Component("IS_SAFE_LEVEL_SET")
public class CheckSecurityLevel extends AssessorTemplate {

    @Override
    protected void assess(AssessParam param, GovernanceAssessDetail detail) throws Exception {

        String securityLevel = param.getTableMetaInfo().getTableMetaInfoExtra().getSecurityLevel();

        if (MetaConstant.SECURITY_LEVEL_UNSET.equals(securityLevel)){
            assessZeroScore(detail,"安全级别未设置！",param,true);
        }
    }
}
